<div class="container-crm">
    <form class="form-horizontal" role="form" method="post" action="<?php echo base_url('products/add'); ?>">
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">Mã hàng hóa</label>
            <div class="col-sm-5">
                <input type="text" name="product_code" class="form-control" id="" placeholder="Mã hàng hóa">
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">Tên hàng hóa</label>
            <div class="col-sm-5">
                <input name="product_name" type="text" class="form-control" id="product_name" placeholder="Tên hàng hóa">
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">Nhóm hàng</label>
            <div class="col-sm-5">
                <select class="form-control" name="category">
                    <?php if ($cate) { ?>
                        <option value="">Chọn danh mục sản phẩm</option>
                        <?php foreach ($cate as $k => $v) { ?>
                            <option value="<?php echo $k; ?>"><?php echo $v; ?></option>
                        <?php } ?>
                    <?php } else { ?>
                        <option value="">Không có danh mục sản phẩm</option>
                    <?php } ?>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">Giá bán</label>
            <div class="col-sm-5">
                <input name="sale_price" type="text" class="form-control" id="sale_price" placeholder="Giá bán">
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">Giá vốn</label>
            <div class="col-sm-5">
                <input name="cost_price" type="text" class="form-control" id="cost_price" placeholder="Giá vốn">
            </div>
        </div>

        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">Tồn kho</label>
            <div class="col-sm-5">
                <input type="in_stock" class="form-control" id="cost_price" placeholder="Tồn kho">
            </div>
        </div>
        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label"></label>
            <div class="col-sm-5">
                <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">

                    <div class="panel panel-default">
                        <div class="panel-heading" role="tab" id="headingTwo">
                            <h4 class="panel-title">
                                <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                                    Thuộc tính
                                </a>
                            </h4>
                        </div>
                        <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
                            <div class="panel-body">
                                <div class="form-group">
                                    <label for="inputPassword3" class="col-sm-2 control-label">Ảnh</label>
                                    <div class="col-sm-5">
                                        <input id="fileupload" type="file" name="files[]" multiple>
                                    </div>
                                    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
                                    <script src="<?php echo base_url('assets/jQuery-File-Upload/js/vendor/jquery.ui.widget.js'); ?>"></script>
                                    <script src="<?php echo base_url('assets/jQuery-File-Upload/js/jquery.iframe-transport.js') ?>"></script>
                                    <script src="<?php echo base_url('assets/jQuery-File-Upload/js/jquery.fileupload.js') ?>"></script>

                                    <script>
                                        $(function () {
                                            $('#fileupload').fileupload({
                                                url:'<?php echo base_url('fileupload/') ?>',
                                                dataType: 'json',
                                                done: function (e, data) {
                                                    $.each(data.result.files, function (index, file) {
                                                        $('<p/>').text(file.name).appendTo(document.body);
                                                    });
                                                }
                                            });
                                        });
                                    </script>

                                </div>

                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>


        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default">Nhập</button>
            </div>
        </div>
    </form>
</div>
